#ifndef PROFILER_H
#define PROFILER_H

#include "utils_global.h"

class SpecPrivate;

class UTILS_EXPORT Profiler : public QObject
{
	Q_OBJECT

public:
	Profiler();
	~Profiler();

public:
	bool read(const QString &fileName);
	bool save(const QString &fileName);

	bool add(SpecPrivate* spec);
	QList<SpecPrivate*>& getSpec();

	bool isExist(const QString &fileName);

public:
	static QString getProfilerFile();

private:
	bool reportError(const QString &err);
	void readPluginSpec(QXmlStreamReader &reader);
	void RemoveAllSpec();

private:
	bool hasError;
	QString errorString;
	QList<SpecPrivate*> listSpec;
};

#endif // PROFILER_H
